Skip to content

chore(triggers): deprecate trigger-save subblock#4107

Merged
waleedlatif1 merged 3 commits intostagingfrom
waleedlatif1/deprecate-trigger-save
Apr 11, 2026
Merged

chore(triggers): deprecate trigger-save subblock#4107
waleedlatif1 merged 3 commits intostagingfrom
waleedlatif1/deprecate-trigger-save

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

  • Remove the defunct triggerSave subblock from all 102 trigger definitions across every provider
  • Remove trigger-save from SubBlockType union, SYSTEM_SUBBLOCK_IDS, tool params, and command templates
  • Retain the backwards-compat filter in getTrigger() to safely handle any legacy stored data

Type of Change

  • Refactor / cleanup (no behavior change)

Testing

  • All 76 block tests pass
  • tsc --noEmit passes with zero errors
  • Lint passes clean

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Remove the defunct triggerSave subblock from all 102 trigger definitions,
the SubBlockType union, SYSTEM_SUBBLOCK_IDS, tool params, and command
templates. Retain the backwards-compat filter in getTrigger() for any
legacy stored data.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 11, 2026 5:51pm

Request Review

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 11, 2026

PR Summary

Low Risk
Low risk cleanup that removes a defunct UI-only subblock type and updates references; main risk is minor trigger UI regressions if any flow still implicitly depended on triggerSave.

Overview
Removes the legacy triggerSave/trigger-save subblock from trigger definitions (webhook + polling) and from the core type system (SubBlockType, SYSTEM_SUBBLOCK_IDS, tool param filtering, and related docs/templates), effectively deprecating the standalone “save” UI element across providers.

Keeps backward compatibility by filtering out triggerSave entries in getTrigger() so workflows with older stored trigger configs won’t break, and updates tests/trigger wiring (e.g., Linear v2 block composition) to no longer expect or strip that subblock.

Reviewed by Cursor Bugbot for commit e26bcfb. Configure here.

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 11, 2026

Greptile Summary

This PR removes the defunct triggerSave subblock from all 102 trigger definitions across every provider, strips it from SubBlockType, SYSTEM_SUBBLOCK_IDS, tool-param exclusion sets, and command templates. A backwards-compatibility filter is retained in getTrigger() to silently drop any legacy occurrences should they surface at runtime. The three-commit series is well-scoped: the main removal, a no-op cleanup in the Linear utils, and a final sweep for the orphaned triggerId property and stale comments.

Confidence Score: 5/5

Safe to merge — pure cleanup with no behavioral changes and a solid backwards-compat filter.

All 102 trigger definitions are cleaned up consistently, the SubBlockType union and SYSTEM_SUBBLOCK_IDS are updated, and the backwards-compat filter in getTrigger() handles any residual occurrences. The only finding is a P2 comment clarification with no correctness impact.

No files require special attention.

Important Files Changed

Filename Overview
apps/sim/triggers/index.ts Adds backwards-compat filter in getTrigger() to strip legacy triggerSave subblocks; comment is slightly misleading (filter runs on registry, not DB-stored data).
apps/sim/blocks/types.ts Removes trigger-save from SubBlockType union and cleans up orphaned triggerId property — straightforward type cleanup.
apps/sim/triggers/constants.ts Removes triggerSave from SYSTEM_SUBBLOCK_IDS; remaining entries and POLLING_PROVIDERS Set are unchanged and correct.
apps/sim/tools/params.ts Removes trigger-save from EXCLUDED_SUBBLOCK_TYPES; the rest of the params logic is untouched and correct.
apps/sim/triggers/linear/utils.ts Leftover no-op blocks.push() removed; trigger option arrays, output builders, and v2 sub-block builder are all intact and correct.
apps/sim/blocks/blocks/linear.ts Representative example of per-block cleanup; triggerSave subblock removed, block structure otherwise unchanged.
.claude/commands/add-trigger.md Command template updated to remove triggerSave references; checklist and examples align with the new trigger structure.
apps/sim/blocks/blocks.test.ts Block test suite updated to reflect removal; all structural assertions remain valid.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[getTrigger called with triggerId] --> B[Look up trigger in TRIGGER_REGISTRY]
    B --> C{Trigger found?}
    C -- No --> D[throw Error: Trigger not found]
    C -- Yes --> E[Filter subBlocks\nremove id === 'triggerSave'\nor type === 'trigger-save']
    E --> F[Map subBlocks through\nnamespaceSubBlockId]
    F --> G{Is webhook / poller trigger?}
    G -- Yes --> H{samplePayload already present?}
    H -- No --> I[Inject samplePayload\nsubBlock with outputs mock]
    H -- Yes --> J[Return cloned TriggerConfig]
    I --> J
    G -- No --> J
Loading

Reviews (2): Last reviewed commit: "chore(triggers): remove orphaned trigger..." | Re-trigger Greptile

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit d0a522c. Configure here.

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

Addressed — removed the orphaned triggerId? property and stale comment from SubBlockConfig in e26bcfb. Also cleaned up the stale "save" reference in the buildTriggerSubBlocks doc comment.

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit e26bcfb. Configure here.

@waleedlatif1 waleedlatif1 merged commit c852585 into staging Apr 11, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/deprecate-trigger-save branch April 11, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant